package com.whdh.demo01;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class C {
    public String  read(){
        A a=new A();
        StringBuffer str =new StringBuffer();
        File file=new File(a.getTMP());
        if(file.exists()) {
            try {
                BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
                String s = null;
                while ((s = bufferedReader.readLine()) != null) {
                    str.append(System.lineSeparator() + s);
                }
                bufferedReader.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }else {
            System.out.println("文件" + file.getPath() + "不存在");
        }
        return str.toString();
    }
}
